Conversation
|
@haacked How do you feel about this? |
|
@nulltoken excited to see this! Having it automatically created on commit sounds good to me. What about other cases when reflog entries are created such as checking out branches and merging two branches? |
@haacked Merging seems a bit far away. However, checking out sounds achievable. Maybe could you create a separate feature request with the use cases you'd like to see implemented? |
|
Sure. |
|
@nulltoken Sorry, I missed a couple of things in my class definitions. Travis should not complain anymore. 🙏 |
LibGit2Sharp.Tests/ReflogFixture.cs
Outdated
There was a problem hiding this comment.
Would StartWith() work as well?
There was a problem hiding this comment.
I used Contains() because there was a trailing "\r" in the clone message... Maybe a minor bug from libgit? This does not happen on commit related reflog entries.
Anyway, I can make it work with Assert.Equal() adding the trailing "\r" in my expectation.
Although, StartWith() does not belong to XUnit built-in assertions methods!
returns the reflog of the reference given as parameter
Fix libgit2#371 Insert entry on HEAD and target direct reference on commit Tag as initial the first commit
|
Here is a first amend on the PR.
|
|
@Saaman Travis ❤️ you. And so am I! Merged. |
This PR is originated by issue #371.
I first introduced the ability to read the reflog :
A
ReflogCollectionis aIEnumerable<ReflogEntry>, whereReflogEntrycontains details about a single entry.Then I corrected the issue by calling
ReflogCollection.Append()from theRepository.Commit()method.I implemented correct message formatting for standard commits and ammended commits. I'm not sure if there is another case to cover.